﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;

namespace Scap.Info
{
    public class ScapEmployee
    {
        public int Id { get; set; }

        public UserProfile User { get; set; }

        [Required]
        [Display(Name = "Identificacion")]
        public string Identification { get; set; }

        public string FullName { get { return LastName + " " + FirstName; } }

        [Required]
        [Display(Name = "Nombres")]
        public string FirstName { get; set; }

        [Required]
        [Display(Name = "Apellidos")]
        public string LastName { get; set; }

        [Display(Name = "Genero")]
        public string Genre { get; set; }

        [Display(Name = "Numero de seguro social")]
        public string SocialSecurityNumber { get; set; }

        [DataType(DataType.Date)]
        public DateTime Birthday { get; set; }

        public int? OriginCityId { get; set; }
        [ForeignKey("OriginCityId")]    
        public ScapLocationCity OriginCity { get; set; }

        public int? ResidenceCityId { get; set; }
        [ForeignKey("ResidenceCityId")]  
        public ScapLocationCity ResidenceCity { get; set; }

        public string HomeAddress { get; set; }

        public string BusinessAddress { get; set; }

        public string PostalCode { get; set; }

        public string HomePhone { get; set; }

        public string BusinessPhone { get; set; }
                
        [StringLength(20, ErrorMessage = "{0} debe tener al menos {2} caracteres de longitud.", MinimumLength = 10)]
        [DataType(DataType.PhoneNumber)]
        [Display(Name = "Celular")]
        public string CellPhone { get; set; }

        [Required]
        [StringLength(100, ErrorMessage = "{0} debe tener al menos {2} caracteres de longitud.", MinimumLength = 6)]
        [DataType(DataType.EmailAddress)]
        [Display(Name = "Email")]
        public string Email { get; set; }

        public string Image { get; set; }

        public ScapEmployeeEnrollCollection Enrollments { get; set; }

        
    }
}
